import edu.gatech.wheresmystuff.model.Item;
import edu.gatech.wheresmystuff.model.User;
import java.util.Date;

import static org.junit.Assert.*;
import org.junit.Test;

/**
 * Tests the User class and InMemoryModel class through the setUsername(), setAdmin(), 
 * removePerson() and getPeople() methods.
 * 
 * @author Amy Domanico
 *
 */
public class AmyTest {

	private User user = new User();
	private Date date = new Date(100,0,0);
	private Item item = new Item("Mickey's Glove","Mickey Mouse's left glove.","Clothing",date,user,"Disney World","lost");
	
	public AmyTest() {
		user.setUsername("aldomanico");
		user.setPassword("meow");
		user.addItem(item);
	}
	
	@Test
	public void usernamePasswordTest() {
		assertTrue(user.getUid().equals("aldomanico"));
		assertTrue(user.getPassword().equals("meow"));
	}
	
	@Test
	public void itemTest() {
		assertFalse(user.addItem(item)); //caught printStackTrace() exception
	}
	
	@Test
	public void adminTest() {
		assertFalse(user.isAdmin());
		user.setAdmin(1);
		assertTrue(user.isAdmin());
	}
}
